The present invention relates to a method and apparatus for rotating Bayer images.
The invention has been developed primarily for a digital camera including an integral printer for providing a paper print of an image captured by the camera and will be described hereinafter with reference to that application. However, it will be appreciated that the invention is not limited to that particular field of use.
According to a first aspect of the invention there is provided method for sampling a Bayer image having two dimensional planes of red, green and blue pixels, the method including the steps of:
rotating the green plane by 45 degrees; sequentially sampling an mxc3x97m pixel block of the rotated image, where m is an integer greater than 1;
providing an address for the m2 samples by determining a starting address for a first of the samples and thereafter applying a predetermined fixed sequence of offsets to obtain the addresses of the remaining samples.
Preferably, the step of determining the starting address is responsive to the relative rotational orientation of the image. More preferably, m=4 and there are sixteen offsets.
According to a second aspect of the invention there is provided an apparatus for sampling a Bayer image having two dimensional planes of red, green and blue pixels, the apparatus including:
input means for rotating the green plane by 45 degrees;
processing means for sequentially sampling an mxc3x97m pixel block of the rotated image, where m is an integer greater than 1;
address means for providing an address for the m2 samples by determining a starting address for a first of the samples and thereafter applying a predetermined fixed sequence of offsets to obtain the addresses of the remaining samples.
Preferably the step of determining the starting address is responsive to the relative rotational orientation of the image. More preferably, m=4 and there are sixteen offsets.